<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人健康档案系统-找回密码</title>
<link href="<%=basePath%>css/login.css" rel='stylesheet'
	type='text/css' />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="<%=basePath %>umeditor/third-party/jquery.min.js"></script>
<script type="text/javascript">

function checkSubmit(){
      $.ajax({  
        type : "post",  
        url : "<%=basePath %>checkUserName.do",  
        data : "name="+name,  
        dataType: "text",  
        success : function(msg) {  
        if(msg=="success"){
           isName=true;
           $("#message").html("");
          }else{
           isName=false;
           $("#message").html("该用户名已存在!");
              }  
           }  
       });
}

</script>
<script type="application/x-javascript">
	 addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } 
</script>
</head>

<body>
	<div class="main">
		<div class="user">
			<img src="images/user.png" alt="">
		</div>
		<div class="login">
			<div class="inset">
				<!-----start-main---->
				<form action="<%=basePath%>saveRegister.do" method="post" onsubmit="return checkSubmit()">
					<div>
						<span style=" color: red;font-size: 14px;" id="message">${message}</span>
					</div>
					<div>
						<span><label>用户名</label></span> <span><input type="text"
							class="textbox" name="name" id="name"></span>
					</div>
					<div class="sign">
						<div class="submit">
							<input type="submit" value="找回密码!">
						</div>
						<span class="forget-pass"> <a href="<%=basePath%>login.do">转到登陆页面</a>
						</span>
						<div class="clear"></div>
					</div>
				</form>
			</div>
		</div>
		<!-----//end-main---->
	</div>
	<!-----start-copyright---->
	<div class="copy-right">
		<p>
			<a href="http://www.jyzhz.com/">惠州市金燕子科技有限公司</a>版权所有
		</p>
	</div>
	<!-----//end-copyright---->

</body>
</html>